{% extends "base.html" %}

{% block title %}
    江湖管理
{% endblock %}

{% block head %}
    <h1 class="page-header">{{ dep }}人员管理</h1>
{% endblock %}

{% block content %}
    <div class="col-lg-12">
        <div class="row">
            <div class="col-lg-8">
            </div>
            <form role="form" class="col-lg-3" method="get" action="person.html">
                <div class="form-group input-group">
                    <input type="hidden" name="department_id" value="">
                    <input type="text" name="person_username" class="form-control" placeholder="输入要搜索的雇员的名字"
                           value="">
                    <span class="input-group-btn">
        <button class="btn btn-default" type="submit">
            <i class="fa fa-search"></i>
        </button>
    </span>
                </div>
            </form>
            <div class="col-lg-1">
                <a class="btn btn-default" href="add_person.html">添加</a>
            </div>
        </div>
        <div class="row">
            {% for d in department_list %}
                <a href="/p_list/{{ d }}/1" class="btn btn-primary">{{ d }}</a>
            {% endfor %}
            <table class="table">
                <thead>
                    <tr>
                        <th>id</th>
                        <th>姓名</th>
                        <th>性别</th>
                        <th>年龄</th>
                        <th>部门</th>
                        <th>职位</th>
                        <th>工资</th>
                        <th>奖金</th>
                    </tr>
                </thead>
                <tbody>
                    {% for p in person_list %}
                        <tr>
                            <td>{{ p.id }}</td>
                            <td>{{ p.name }}</td>
                            <td>{{ p.gender }}</td>
                            <td>{{ p.age }}</td>
                            <td>{{ p.department }}</td>
                            <td>{{ p.position }}</td>
                            <td>{{ p.money }}</td>
                            <td>{{ p.bonus }}</td>
                        </tr>
                    {% endfor %}
                </tbody>
            </table>
            <ul class="pagination pull-right">
                <li><a href="/p_list/{{ dep }}/1">1</a></li>
                <li><a href="/p_list/{{ dep }}/2">2</a></li>
                <li><a href="/p_list/{{ dep }}/3">3</a></li>
                <li><a href="/p_list/{{ dep }}/4">4</a></li>
                <li><a href="/p_list/{{ dep }}/5">5</a></li>
            </ul>


        </div>
    </div>
{% endblock %}